package chapter06

import scala.beans.BeanProperty

object Test03_Class {
  def main(args: Array[String]): Unit = {
    val student = new Student()
    println(student.name)
    println(student.age)
    student.age = 18
    println(student.age)
  }
}


class Student {
  //定义属性
  @BeanProperty
  var name: String = _
  @BeanProperty
  var age: Int = _
  @BeanProperty
  var sex: String = _

}
